<?php
namespace Admin\Model;//命名空间 防止重名
use Think\Model\ViewModel;//自动加载核心控制器类
class NewsViewModel extends ViewModel {
    public $viewFields = array(
        'News' => array('id','title','img','intro','c_time','u_time','_type'=>'LEFT'),
        
        'NewsInfo' => array('content','_on'=>'News.id = NewsInfo.news_id')
    );
}